f9caa0dd
@@ -52,8 +52,6 @@
import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.apache.camel.util.ExchangeHelper.convertToType;
-
 /**
  * Represents the metadata about a bean type created via a combination of
  * introspection and annotations together with some useful sensible defaults
@@ -571,8 +569,9 @@
public class BeanInfo {
                 if (methodInfo.getBodyParameterType().isInstance(body)) {
                     return methodInfo;
                 }
-                
-                Object value = convertToType(exchange, methodInfo.getBodyParameterType(), body);
+
+                // we should only try to convert, as we are looking for best match
+                Object value = exchange.getContext().getTypeConverter().tryConvertTo(methodInfo.getBodyParameterType(), exchange, body);
                 if (value != null) {
                     if (LOG.isTraceEnabled()) {
                         LOG.trace("Converted body from: {} to: {}",
